package com.candy.th01;

public class Thread01 extends Thread{
    private Thread02 thread02;
    public Thread01(String name){
        super(name);
    }

    public Thread01(){

    }

    @Override
    public void run() {
        for(int i=0;i<10;i++){
            System.out.println(i+"黑龙");
            try {
                if(i==5){
                    thread02.join();
                }
                    Thread.sleep(300);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
}
